<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Phalanx Holding | Log in</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <!-- Bootstrap 3.3.4 -->
    <link rel="apple-touch-icon" href="__PUBLIC__/img/star.jpg" />
    <link rel="icon" sizes="196x196" href="__PUBLIC__/img/star.jpg">
    <link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- Font Awesome Icons -->
    <link href="__PUBLIC__/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <!-- Theme style -->
    <link href="__PUBLIC__/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
    <!-- iCheck -->
    <link href="__PUBLIC__/plugins/iCheck/square/blue.css" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" href="__PUBLIC__/dist/css/bootstrapValidator.css"/>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        .glyphicon-ok,.glyphicon-remove {
            display: none !important;
        }
         .input-group-addon {
            padding: 6px 12px;
            font-size: 14px;
            font-weight: 400;
            text-align: center;
            border: 1px solid #ccc;
        }
        .input-group-addon:last-child {
            width: 38px;
            position: absolute;
            top: 0px;
            right: 0;
            z-index: 999;
            height: 34px;
            border-left:1px solid #ccc;
        }
        .input-group {
            display:block;
        }
        .checkbox-li {position: relative;display: block;margin-left: 20px;margin-bottom: 14px;}
    </style>
</head>

<body class="login-page">
<div class="login-box">
    <div class="login-logo">
        <a href="#"><b>Phalanx</b>Holding</a>
    </div><!-- /.login-logo -->
    <div class="login-box-body widget-box visible"  id="login-box">
        <p class="login-box-msg">Sign in to start your session</p>
        <form action="__URL__/checkLogin/" method="post" id="loginForm">
            <div class="form-group has-feedback clearfix">
                <div class="col-md-12  no-padding">
                    <input type="text" name="account" class="form-control" value="{$rember_account}"  placeholder="Email"  />
                    <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
                </div>
            </div>
            <div class="form-group has-feedback clearfix">
                <input type="password" name="password" class="form-control"
                       placeholder="Password"  value="{$rember_pwd}" id="password" data-validation-regex-regex="a.*z"
                       data-validation-regex-message="Must start with 'a' and end with 'z'" />
            </div>
            <div class="form-group has-feedback clearfix">
                    <input  type="text"  name="verify" class="code" size="15" />
                    <span><img id="verifyImg" SRC="__URL__/verify/" onclick="fleshVerify()" border="0" alt="点击刷新验证码" style="cursor:pointer;margin-top:-3px;" align="absmiddle"></span>
            </div>
            <div class="row">
                <div class="col-xs-8">
                    <div class="checkbox icheck checkbox-li">
                        <label>
                            <input type="checkbox" value="1" name="remober"> Remember Me
                        </label>
                    </div>
                    <a href="__URL__/login_forgot" >I forgot my password</a>
                </div>
                <div class="col-xs-4">
                    <button type="submit" class="btn btn-primary btn-block btn-flat">Sign In</button>
                </div>
            </div>
        </form>
    </div><!-- /.login-box-body -->
</div><!-- /.login-box -->

<!-- jQuery 2.1.4 -->
<script src="__PUBLIC__/plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.2 JS -->
<script src="__PUBLIC__/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="__PUBLIC__/dist/js/bootstrapValidator.js" type="text/javascript"></script>
<script src="__PUBLIC__/dist/js/language/zh_CN.js" type="text/javascript"></script>
<script src="__PUBLIC__/dist/js/validator.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/show-password/bootstrap-show-password.min.js"></script>
<script type="text/javascript">

    $(document).ready(function() {
        $('#loginForm').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                account: {
                    validators: {
                        notEmpty: {
                            message: 'Email can not be empty'
                        },
                        emailAddress: {
                            message: 'Please enter a valid email address'
                        }
                    }
                },
                password: {
                    validators: {
                        notEmpty: {
                            message: 'Password can not be empty'
                        },
                        different: {
                            field: 'account',
                            message: 'Password can not be the same as the account'
                        }
                    }
                },
                verify: {
                    validators: {
                        notEmpty: {
                            message: 'Verify code can not be empty'
                        }
                    }
                }

            }

        });
        $('#password').password().on('show.bs.password', function(e) {
            $('#methods').prop('checked', true);
        }).on('hide.bs.password', function(e) {
            $('#methods').prop('checked', false);
        });
        $('#methods').click(function() {
            $('#password').password('toggle');
        });
    });
    function fleshVerify(type){
        //重载验证码
        var timenow = new Date().getTime();
        if (type){
            $('#verifyImg').attr("src", '__URL__/verify/adv/1/'+timenow);
        }else{
            $('#verifyImg').attr("src", '__URL__/verify/'+timenow);
        }
    }
</script>
</body>
</html>